package m.common.model;

import m.common.model.type.FieldType;

import java.util.Date;

public class HostInfo extends Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@FieldMeta(name="ipport",type=FieldType.STRING,length=20,description="ipport")
	private String ipport;
	@FieldMeta(name="server_port",type=FieldType.INT,description="服务端口")
	private Integer serverPort;//
	@FieldMeta(name="total",type=FieldType.INT,description="total")
	private Integer total;//
	@FieldMeta(name="jar_name",type=FieldType.STRING,description="执行的jar")
	private String jarName;
	@FieldMeta(name="error",type=FieldType.STRING,description="错误消息")
	private String error;

	@FieldMeta(name="create_date",type=FieldType.DATE,description="create_date")
	private Date createDate=new Date();
	@FieldMeta(name="last_date",type=FieldType.DATE,description="last_date")
	private Date lastDate;

	@FieldMeta(name="total_memory",type=FieldType.DOUBLE,description="JVM总内存")
	private Double totalMemory=0.0;//JVM总内存
	@FieldMeta(name="free_memory",type=FieldType.DOUBLE,description="JVM分配内存")
	private Double freeMemory=0.0;//JVM分配内存
	@FieldMeta(name="max_memory",type=FieldType.DOUBLE,description="JVM最大内存")
	private Double maxMemory=0.0;//JVM最大内存
	@FieldMeta(name="db_use_link_num",type=FieldType.INT,description="db_use_link_num")
	private Integer dbUseLinkNum=0;//数据库当前连接数
	@FieldMeta(name="db_max_link_num",type=FieldType.INT,description="db_max_link_num")
	private Integer dbMaxLinkNum=0;//数据库连接数峰值

	@FieldMeta(name="os_info",type=FieldType.STRING,description="操作系统信息")
	private String osInfo;//操作系统信息
	@FieldMeta(name="mem_total",type=FieldType.DOUBLE,description="系统总内存")
	private Double memTotal=0.0;
	@FieldMeta(name="mem_used",type=FieldType.DOUBLE,description="系统剩余内存")
	private Double memUsed=0.0;
	@FieldMeta(name="cpu_user",type=FieldType.DOUBLE,description="用户CPU使用率")
	private Double cpuUser=0.0;
	@FieldMeta(name="cpu_combined",type=FieldType.DOUBLE,description="总CPU使用率")
	private Double cpuCombined=0.0;
	
	public String getError() {
		return error;
	}
	public void setError(String error) {
		this.error = error;
	}
	public String getJarName() {
		return jarName;
	}
	public void setJarName(String jarName) {
		this.jarName = jarName;
	}
	public String getOsInfo() {
		return osInfo;
	}
	public void setOsInfo(String osInfo) {
		this.osInfo = osInfo;
	}
	public Double getMemTotal() {
		return memTotal;
	}
	public void setMemTotal(Double memTotal) {
		this.memTotal = memTotal;
	}
	public Double getMemUsed() {
		return memUsed;
	}
	public void setMemUsed(Double memUsed) {
		this.memUsed = memUsed;
	}
	public Double getCpuUser() {
		return cpuUser;
	}
	public void setCpuUser(Double cpuUser) {
		this.cpuUser = cpuUser;
	}
	public Double getCpuCombined() {
		return cpuCombined;
	}
	public void setCpuCombined(Double cpuCombined) {
		this.cpuCombined = cpuCombined;
	}
	public Integer getDbMaxLinkNum() {
		return dbMaxLinkNum;
	}
	public Integer getServerPort() {
		return serverPort;
	}
	public void setServerPort(Integer serverPort) {
		this.serverPort = serverPort;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public void setDbMaxLinkNum(Integer dbMaxLinkNum) {
		this.dbMaxLinkNum = dbMaxLinkNum;
	}
	public Integer getDbUseLinkNum() {
		return dbUseLinkNum;
	}
	public void setDbUseLinkNum(Integer dbUseLinkNum) {
		this.dbUseLinkNum = dbUseLinkNum;
	}
	public Integer getTotal() {
		return total;
	}
	public void setTotal(Integer total) {
		this.total = total;
	}
	public Date getLastDate() {
		return lastDate;
	}
	public void setLastDate(Date lastDate) {
		this.lastDate = lastDate;
	}
	public Double getTotalMemory() {
		return totalMemory;
	}
	public void setTotalMemory(Double totalMemory) {
		this.totalMemory = totalMemory;
	}
	public Double getFreeMemory() {
		return freeMemory;
	}
	public String getIpport() {
		return ipport;
	}
	public void setIpport(String ipport) {
		this.ipport = ipport;
	}
	public void setFreeMemory(Double freeMemory) {
		this.freeMemory = freeMemory;
	}
	public Double getMaxMemory() {
		return maxMemory;
	}
	public void setMaxMemory(Double maxMemory) {
		this.maxMemory = maxMemory;
	}
}
